package base.thread_JUC2.chapter01.demo004;

import java.util.concurrent.TimeUnit;

public class TestCase {
    public static void main(String[] args) {
        FileSearch searcher=new FileSearch("C:\\","wordpad.exe");
        Thread thread=new Thread(searcher);

        thread.start();

        try {
            TimeUnit.SECONDS.sleep(10);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        // 打断线程
        thread.interrupt();
    }
}
